﻿using System;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Common;
namespace Print
{
    public partial class Item : PrintPageBase
    {
        private PBLL.PService bllService = new PBLL.PService();
        public string id = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string title = config.P_Title;
                if (string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    Response.Redirect(config.P_WebPath);
                }
                id = Request.QueryString["id"].ToString();
                ServiceRpt.DataSource = bllService.GetList("");
                OleDbDataReader dr = bllService.GetDr(id);
                if (dr.Read())
                {
                    rightTit.InnerHtml = "<strong>印刷项目</strong> > <span class=\"red\">" + dr["STitle"].ToString() + "<span>";
                    details.InnerHtml = "<hr />" + dr["SCont"].ToString();
                    GetAd(AdRpt, dr["STitle"].ToString());
                    title = dr["STitle"].ToString() + "-" + config.P_Name;
                }
                Page.Header.Title = title;
                Page.DataBind();
            }
        }
    }
}